{
  "properties" : { },
  "id" : "9d221b8463d645d0817d2470e4824da0",
  "script" : null,
  "groupId" : "ac591c67b817445b854550336cb082f2",
  "name" : "查询告警级别列表",
  "createTime" : 1727070923332,
  "updateTime" : 1724839511068,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "list",
  "method" : "GET",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": {\n        \"total\": 5,\n        \"current\": 1,\n        \"size\": 30,\n        \"records\": [\n            {\n                \"id\": 9,\n                \"levelName\": \"紧急\",\n                \"level\": 1,\n                \"levelDescr\": \"紧急告警\",\n                \"displayColor\": \"#EE1A1A\",\n                \"rowId\": 1\n            },\n            {\n                \"id\": 10,\n                \"levelName\": \"严重\",\n                \"level\": 5,\n                \"levelDescr\": \"严重告警\",\n                \"displayColor\": \"#E19506\",\n                \"rowId\": 2\n            },\n            {\n                \"id\": 11,\n                \"levelName\": \"一般\",\n                \"level\": 10,\n                \"levelDescr\": \"一般告警\",\n                \"displayColor\": \"#F9E60C\",\n                \"rowId\": 3\n            },\n            {\n                \"id\": 12,\n                \"levelName\": \"提示\",\n                \"level\": 15,\n                \"levelDescr\": \"提示\",\n                \"displayColor\": \"#33B9E4\",\n                \"rowId\": 4\n            },\n            {\n                \"id\": 13,\n                \"levelName\": \"测试\",\n                \"level\": 1,\n                \"levelDescr\": \"测试\",\n                \"displayColor\": \"\",\n                \"rowId\": 5\n            }\n        ]\n    }\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
var sql = """
    SELECT * FROM alarm_level
    <where>
        <if test="levelName != null and levelName != ''">
            AND LEVEL_NAME LIKE  CONCAT('%',#{levelName} ,'%')
        </if>
    </where>
"""

return db.page(sql) 